<div class="page" style="z-index:500" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
    <div class="hd">
        <h1 class="page_title" th:text="${page.name}"></h1>
        <p th:text="${page.describe}" class="page_desc">表单编辑</p>
    </div>
    <!--主提组件-->
    <div class="bd" style="z-index: 2">
        <th:block th:each="key:${tables.keySet()}">
            <div th:text="${tables.get(key).discribe}" class="weui-cells__title">单选列表项</div>
            <form th:class="'edit-page__'+${page.id}">
                <div th:if="${!(tableConfigs.get(key).multInput>0)}" class="weui-cells">
                    <th:block th:each="column:${columns.get(key)}">
                        <th:block th:unless="${parameterMap.containsKey(column.name)}" th:switch="${column.editType}">
                            <!--选择列表-->
                            <div th:case="choose_list"
                                 class="weui-cell weui-cell_select weui-cell_select-after">
                                <div class="weui-cell__hd">
                                    <label for="" th:text="${column.describe}"
                                           class="weui-label">国家/地区</label>
                                </div>
                                <div class="weui-cell__bd">
                                    <select class="weui-select"
                                            th:name="${column.name}">
                                        <option value="" style="display: none"></option>
                                        <option th:if="${data.containsKey(column.name)}" th:each="col:${column.data}"
                                                th:value="${col.get(linkTables.get(column.linkColumn.pid).index)}"
                                                th:text="${col.get(column.getLinkColumn().name)}"
                                                th:selected="(${col.get(linkTables.get(column.linkColumn.pid).index)}==${data.get(column.name)})?'true':'false'">
                                            中国
                                        </option>
                                        <option th:unless="${data.containsKey(column.name)}" th:each="col:${column.data}"
                                                th:value="${col.get(linkTables.get(column.linkColumn.pid).index)}"
                                                th:text="${col.get(column.getLinkColumn().name)}">
                                            中国
                                        </option>
                                    </select>
                                </div>
                            </div>

                            <!--数字列表-->
                            <div th:case="number" class="weui-cell">
                                <div class="weui-cell__hd"><label
                                        th:text="${column.describe}" class="weui-label">qq</label>
                                </div>
                                <div class="weui-cell__bd">
                                    <input th:name="${column.name}" class="weui-input"
                                           type="number" pattern="[0-9]*"
                                           placeholder="请输入数字"
                                           th:value="${data.containsKey(column.name)}?${data.get(column.name)}:''">
                                </div>
                            </div>

                            <!--日期列表-->
                            <div th:case="date" class="weui-cell">
                                <div class="weui-cell__hd"><label
                                        th:text="${column.describe}" for=""
                                        class="weui-label">日期</label></div>
                                <div class="weui-cell__bd">
                                    <input th:name="${column.name}" class="weui-input"
                                           type="date" th:value="${data.containsKey(column.name)}?${data.get(column.name)}:''">
                                </div>
                            </div>

                            <!--开关列表-->
                            <div th:case="switch" class="weui-cell weui-cell_switch">
                                <div th:text="${column.describe}" class="weui-cell__bd">
                                    标题文字
                                </div>
                                <div class="weui-cell__ft">
                                    <input th:name="${column.name}" class="weui-switch"
                                           type="checkbox"
                                           th:value="${data.containsKey(column.name)}?${data.get(column.name)}:''">
                                </div>
                            </div>

                            <!--选择列表-->
                            <div th:case="select"
                                 class="weui-cell weui-cell_select weui-cell_select-after">
                                <div class="weui-cell__hd">
                                    <label for="" th:text="${column.describe}"
                                           class="weui-label">国家/地区</label>
                                </div>
                                <div class="weui-cell__bd">
                                    <select class="weui-select"
                                            th:name="${column.name}">
                                        <option value="" style="display: none"></option>
                                        <option th:each="col:${column.data}"
                                                th:value="${col.get(linkTables.get(column.getLinkColumn().pid).index)}"
                                                th:text="${col.get(column.getLinkColumn().name)}"
                                                th:selected="(${col.get(linkTables.get(column.getLinkColumn().pid).index)}==${data.get(column.name)})?'selected':''">
                                            中国
                                        </option>
                                    </select>
                                </div>
                            </div>

                            <!--文本列表-->
                            <div th:case="text" class="weui-cell">
                                <div class="weui-cell__bd">
                                    <input th:name="${column.name}" class="weui-input"
                                           type="text"
                                           th:placeholder="${column.describe}"
                                           th:value="${data.containsKey(column.name)}?${data.get(column.name)}:''">
                                </div>
                            </div>
                            <!--文本区-->
                            <div th:case="textarea" class="weui-cell">
                                <div class="weui-cell__bd">
                                    <textarea th:name="${column.name}" th:placeholder="${column.describe}"
                                              class="weui-textarea" rows="3"
                                              th:value="${data.containsKey(column.name)}?${data.get(column.name)}:''"></textarea>
                                    <div class="weui-textarea-counter"><span>0</span>/200</div>
                                </div>
                            </div>
                        </th:block>
                    </th:block>
                </div>
            </form>
            <div th:if="${(tableConfigs.get(key).multInput>0)}" class="weui-cells">
                <form th:class="'edit-page__'+${page.id}">
                    <div class="weui-cell__add_target"></div>
                </form>
                <a href="javascript:void(0);" class="weui-cell__add weui-cell weui-cell_link">
                    <div class="weui-cell__bd">添加更多</div>
                </a>
                <div class="weui-cell__add_content">
                    <div class="weui-cell">
                        <th:block th:each="column:${columns.get(key)}">
                            <th:block th:switch="${column.editType}">
                                <!--chooseList-->
                                <div th:case="choose_list" class="weui-cell__bd" style="margin: 0px 16px 0px 16px;">
                                    <select class="weui-select"
                                            th:name="${column.name}">
                                        <option th:each="col:${column.data}"
                                                th:value="${col.get(linkTables.get(column.linkColumn.pid).index)}"
                                                th:text="${col.get(column.linkColumn.name)}">
                                            中国
                                        </option>
                                    </select>
                                </div>
                                <!--number-->
                                <div th:case="number" class="weui-cell__bd" style="margin: 0px 16px 0px 16px;">
                                    <div class="weui-count">
                                        <a class="weui-count__btn weui-count__decrease"></a>
                                        <input class="weui-count__number" type="number"
                                               th:name="${column.name}" value="1">
                                        <a class="weui-count__btn weui-count__increase"></a>
                                    </div>
                                </div>
                                <!--data-->
                                <div th:case="data" class="weui-cell__bd" style="margin: 0px 16px 0px 16px;">
                                    <input class="weui-input" type="date"
                                           th:name="${column.name}">
                                </div>
                                <!--datetimeLocal-->
                                <div th:case="datetime_local" class="weui-cell__bd"
                                     style="margin: 0px 16px 0px 16px;">
                                    <input class="weui-input" type="datetime-local"
                                           th:name="${column.name}"
                                           placeholder="">
                                </div>
                                <!--switch-->
                                <div th:case="switch" class="weui-cell__bd" style="margin: 0px 16px 0px 16px;">
                                    <label th:for="'switchCP_'+${column.id}"
                                           class="weui-switch-cp">
                                        <input th:id="'switchCP_'+${column.id}"
                                               class="weui-switch-cp__input" type="checkbox"
                                               checked="checked" th:name="${column.name}">
                                        <div class="weui-switch-cp__box"></div>
                                    </label>
                                </div>
                                <!--text-->
                                <div th:case="text" class="weui-cell__bd" style="margin: 0px 16px 0px 16px;">
                                    <input class="weui-input" type="text" placeholder="请输入文本"
                                           th:name="${column.name}">
                                </div>
                                <!--textArea-->
                                <div th:case="text_area" class="weui-cell__bd" style="margin: 0px 16px 0px 16px;">
                                    <input class="weui-input" type="text" placeholder="请输入文本"
                                           th:name="${column.name}">
                                </div>
                            </th:block>
                        </th:block>
                    </div>
                </div>
            </div>
        </th:block>
        <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary weui-click__post" href="javascript:"
               th:data-form="'.edit-page__'+${page.id}"
               th:data-url="${#httpServletRequest.getRequestURL()+'?'+queryString}">确定</a>
        </div>
    </div>
</div>